<div class="al-modal-view">
  <!--<div class="modal-filter" ng-click="clearModal()"></div>-->
  <div>
    <div class="al-modal-title">{{modalTitle}}</div>
    <div class="al-modal-form-container">
      <div class="al-list-container">
        <form class="form-horizontal al-search-container" role="form">
          <div class="form-group">
            <label class="col-sm-2 control-label">公寓</label>
            <div class="col-sm-2">
              <select ng-model="search.apartmentId" class="form-control"
                      ng-options="option.id as option.name for option in apartmentList"></select>
            </div>
            <label class="col-sm-2 control-label">房间号</label>
            <div class="col-sm-2">
              <input class="form-control" ng-model="search.houseNo" type="text" placeholder=""/>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">名称</label>
            <div class="col-sm-2">
              <input class="form-control" ng-model="search.customerName" type="text" placeholder=""/>
            </div>
            <label class="col-sm-2 control-label">手机号</label>
            <div class="col-sm-2">
              <input class="form-control" ng-model="search.customerPhone" type="text" placeholder=""/>
            </div>
            <div class="col-sm-2">
              <button type="button" ng-click="queryData()" class="btn btn-success al-float-right">查询</button>
            </div>
            <div class="col-sm-2">
              <button type="button" ng-click="resetSearch()" class="btn btn-default">重置</button>
            </div>
          </div>
        </form>
        <table ng-table="tableParams"
               class="table  table-bordered table-striped table-condensed al-table-container">
          <thead>
          <tr>
            <td class="text-center">选择</td>
            <td>合同号</td>
            <td>公寓</td>
            <td>楼栋</td>
            <td>房间号</td>
            <td>租房人姓名</td>
            <td>租房人手机</td>
            <!--<td>操作</td>-->
          </tr>
          </thead>
          <tbody>
          <tr ng-repeat="item in $data">
            <td class="text-center"><input name="contract" type="radio"
                       value="{{item.id}}" ng-click="chooseItem(item)"></td>
            <td>{{item.uuid}}</td>
            <td>{{item.apartmentName}}</td>
            <td>{{item.buildingName}}</td>
            <td>{{item.houseNo}}</td>
            <td>{{item.customerName}}</td>
            <td>{{item.customerPhone}}</td>
            <!--<td>-->
              <!--<button class="btn btn-info btn-sm" ng-click="viewData(item)">查看</button>-->
            <!--</td>-->
          </tr>
          </tbody>
        </table>
        <form class="form-horizontal" role="form">
          <div class="form-group">
            <div class="col-sm-offset-3 col-sm-3">
              <button class="btn btn-default" ng-click="cancel()">取消</button>
            </div>
            <div class="col-sm-3">
              <button class="btn btn-warning" ng-disabled="!pickedItem" ng-click="confirm()">选择</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>